#include <afxwin.h>
#include "CMainFrame.h"
#include "CFrameToolBar.h"
#include "CMenuBar.h"

#include "Resource.h"

static CMenu menu;
CMainFrame::CMainFrame(){
	this->Create(NULL, TEXT("WinMainFrame"));

	/*this->m_toolBar = new CFrameToolBar();
	EnableDocking(CBRS_ALIGN_ANY);
	*/

	/*this->m_menuBar = new CMenuBar();
	m_menuBar->SetPaneStyle(m_menuBar->GetPaneStyle() | CBRS_SIZE_DYNAMIC);
	m_menuBar->EnableCustomizeButton(TRUE, -1, _TEXT("MenuBar"));
	m_menuBar->EnableHelpCombobox(1, _T("enter text here"), 30);
	m_menuBar->EnableMenuShadows();
	m_menuBar->SetMaximizeMode(true);*/
	
	/*menu.CreateMenu();
	menu.AppendMenuW(MF_ENABLED | MF_STRING, 5000, _T("Menu"));

	SetMenu(&menu);
	// this->do
	*/
	/*
	if(menu == NULL)
	{
		MessageBox(_T("menu is null"));
	}
	menu.LoadMenuW(ID_Menu);
	*/
	/*
	this->m_hMenu = menu;
	this->m_hMenuDefault = menu;*/
	//SetMenu(NULL);
	// ::DestroyMenu(m_hMenuDefault);
	
	// menu.CreateMenu();
	/*SetMenu(&menu);
	m_hMenuDefault = menu.GetSafeHmenu();
	*/

	HMENU hmenu;
	hmenu = LoadMenu(::GetModuleHandle(0), MAKEINTRESOURCE(ID_Menu));

	HINSTANCE hInstance;
}

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs){
	if(cs.hMenu == NULL){
		// cs.hMenu = *this->m_menuBar;
		// MessageBox(_T("PreCreateWindow"));
	}
	return FALSE;
}
